import React, {useState} from 'react';

import { useModel } from 'umi';
import {Alert, Card, Spin} from 'antd';
import {PageContainer} from "@ant-design/pro-layout";
import { Tabs, Radio } from 'antd';
import {useRequest} from "@@/plugin-request/request";

const { TabPane } = Tabs;

export default () => {
  const { initialState, loading, refresh, setInitialState } = useModel('@@initialState');



  if (loading) {
    return <Spin />;
  }


  return (
    <PageContainer>
      <Card>
        <Tabs defaultActiveKey="1"  style={{ marginBottom: 32 }} tabPosition='left'>
          <TabPane tab="绑定微信" key="1">
            绑定微信
            {
              initialState?.currentUser?.openid === null ?
                <a target='_blank' href={initialState?.currentUser?.wechat_url}>绑定</a>
                :
                <span>已绑定</span>
            }
          </TabPane>
        </Tabs>
      </Card>
    </PageContainer>
  );
};
